package top.lixunda.ecommerce.server.good.api.entity.db;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品描述，放在详情页商品基本信息下方
 * </p>
 *
 * @author Xumda
 * @since 2020-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("good_produce")
@ApiModel(value = "GoodProduceDO对象", description = "商品描述，放在详情页商品基本信息下方")
public class GoodProduceDO extends Model<GoodProduceDO> {

    private static final long serialVersionUID = 1L;

    /**
     * 内容类型
     * TEXT         普通文本
     * PICTURE      图片描述
     * RICH_TEXT    富文本
     */
    public static final String CONTENT_TYPE_TEXT = "TEXT";
    public static final String CONTENT_TYPE_IMAGE = "PICTURE";
    public static final String CONTENT_TYPE_RICH_TEXT = "RICH_TEXT";

    @ApiModelProperty(value = "商品介绍编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "店铺id")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "商品id")
    @TableField("good_id")
    private Integer goodId;

    @ApiModelProperty(value = "类型，文字描述，图片描述，富文本表示")
    @TableField("content_type")
    private String contentType;

    @ApiModelProperty(value = "文字描述")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "图片描述")
    @TableField("image")
    private String image;

    @ApiModelProperty(value = "图片文件id")
    @TableField("image_file_id")
    private Integer imageFileId;

    @ApiModelProperty(value = "富文本")
    @TableField("rich_text_content")
    private String richTextContent;

    @ApiModelProperty(value = "本内容连接的商品地址")
    @TableField("link_good_id")
    private Integer linkGoodId;

    @ApiModelProperty(value = "本内容连接的子商品编号")
    @TableField("link_sub_good_id")
    private Integer linkSubGoodId;

    @ApiModelProperty(value = "本内容连接的地址，站内地址或站外地址")
    @TableField("link_url")
    private String linkUrl;

    @ApiModelProperty(value = "排序字段，默认为零，可以通过更改此字段改变排序，该字段相同时以创建更新时间排序")
    @TableField("sort_number")
    private Integer sortNumber;

    @ApiModelProperty(value = "新增时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "新增人员id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "新增人员名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "更新人员id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "更新人员名称")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "删除时间")
    @TableField("remove_time")
    private LocalDateTime removeTime;

    @ApiModelProperty(value = "删除人员id")
    @TableField("remove_user_id")
    private Integer removeUserId;

    @ApiModelProperty(value = "删除人员名称")
    @TableField("remove_user_name")
    private String removeUserName;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "逻辑删除")
    @TableField("useable")
    private Integer useable;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
